home *** CD-ROM | disk | FTP | other *** search
- DOS and DON'Ts -- Part 18
-
- by Joel Ellis Rea
-
-
-
- This month we will discuss some ad-
-
- vanced SEQuential file handling, in-
-
- cluding an undocumented OPEN mode!
-
- The undocumented OPEN mode param-
-
- eter is ,A for APPEND. The ,A param-
-
- eter tells DOS that you want to OPEN
-
- an existing file, but that you want to
-
- WRITE data to it, not READ data from
-
- it. The ,A parameter tells DOS
-
- that all new data will be written to
-
- the END of the file, instead of the
-
- BEGINNING. In other words, DOS is
-
- told to APPEND new data to the END of
-
- an ALREADY EXISTING file! This saves
-
- having to OPEN the existing file for
-
- READ, OPENing a dummy file for WRITE,
-
- copying every character from the READ
-
- file to the dummy file, CLOSING the
-
- READ file and Deleting the READ file,
-
- before you can WRITE the new data. You
-
- would then have to CLOSE the DUMMY
-
- file, then RENAME the DUMMY file to
-
- the name of the old, now deleted READ
-
- file! (AND you would have to hope you
-
- had enough free space on the disk to
-
- hold a copy of an existing file!). The
-
- ,A(PPEND) parameter saves you that
-
- trouble, and enables you to add new
-
- data automatically.
-
-
- ------- Continued in Part 19 ---------
-